<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<div id="update_info_modal" class="easyui-window" title="更新用户信息"
	data-options="modal:true,closed:true,maximizable:false,
	    minimizable:false"
	style="width: 500px; padding: 20px;">
	<div data-options="region:'north'">
		<form id='update_customer_form' class="easyui-form" method="post">
			<table style="margin: auto;">
				<tr>
					<td><label for="name">用户名:</label></td>
					<td><input class="easyui-textbox" type="text"
						name="login_name"
						data-options="required:true,missingMessage:'请输入用户名'" /></td>
				</tr>
				<input type="hidden" name="id"/>
				<input type="hidden" name="customerNo"/>
				<input type="hidden" name="login_password"/>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">真实姓名:</label></td>
					<td><input class="easyui-textbox" type="text" name="user_name"
						data-options="required:true,missingMessage:'请输入真实姓名'" /></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">公司名称:</label></td>
					<td><input class="easyui-textbox" name="companyName"
						data-options="multiline:true" style="height: 50px;" /></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">公司地址:</label></td>
					<td><input class="easyui-textbox" name="companyAddr"
						data-options="multiline:true" style="height: 50px;" /></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">公司电话:</label></td>
					<td><input class="easyui-textbox" name="companyPhone"
						data-options="validType:'tel'" /></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">手机：</label></td>
					<td><input class="easyui-textbox" name="user_mobile"
						data-options="validType:'mobile'" /></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>				
				<tr>
					<td><label for="alipayNo">支付宝账号：</label></td>
					<td><input class="easyui-textbox" name="alipayNo"/></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">QQ号：</label></td>
					<td><input class="easyui-textbox" name="qqNumber"
						data-options="validType:'QQ'" /></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">当前业务：</label></td>
					<td><select class="easyui-combobox" name="transaction" data-options="panelHeight:'auto'"style="width:142px">
							<option value="FBA换标">FBA换标</option>
							<option value="FBA中转">FBA中转</option>
							<option value="海外仓储">海外仓储</option>
							<option value="FBA退货业务">FBA退货业务</option>
					</select></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">主要产品：</label></td>
					<td><input class="easyui-textbox" name="product" /></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="name">常用email：</label></td>
					<td><input class="easyui-textbox" name="user_email"
						data-options="validType:'email'" /></td>
				</tr>
			</table>
		</form>
	</div>
	<div data-options="region:'center'" style="text-align: center">
		<br /> <a id="update_customer_btn" href="javascript:void(0);"
			class="easyui-linkbutton" data-options="iconCls:'icon-ok'">确认修改</a>
	</div>
	<script type="text/javascript">
		$("#update_customer_btn").click(function() {
			$("#update_customer_form").form('submit', {
				url : "admin/system/customer_manage?method=update",
				dataType : 'json',//无效？？？
				onSubmit : function() {
					var isValid = $(this).form('validate');
					return isValid;
				},
				success : function(data) {
					//$.messager.alert('提示信息', data);
					var data = eval("(" + data + ")");
					if (data.success == false) {
						$.messager.alert('提示信息', data.msg);
					} else {
						$.messager.alert('提示信息',data.msg);
						$("#update_customer_form").form('clear');
						$("#update_info_modal").window('close');
						$("#customer_mana_datagrid").datagrid('load');
					}

				},
				error : function(XMLHttpRequest, textStatus, errorThrown) {
					alert(XMLHttpRequest.status);
					alert(XMLHttpRequest.readyState);
					alert(textStatus);
					alert("异常");
				}
			});
		});
		</script>